Hi Gillian,
Has your work got an Absence Managment Policy? If so, get a copy, get to know it intimately, make sure they follow it , take somebody with you preferably a union rep, make detailed notes and don't take any nonsense! If they don't bend over backwards to help you stay in work you'll have a good chance of winning a tribunal if it goes to dismissal.
Good luck
Sara